package dowork;

import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import com.sutuijingling.a.b;
import com.sutuijingling.a.e;

public class CheckColorRunner extends UiAutomatorTestCase {
    public void testDoWork() {
        UiDevice uiDevice = getUiDevice();
        b a = b.a(uiDevice);
        try {
            e eVar = new e(uiDevice);
            eVar.checkAppIsCode();
            UiObject findTextContain = eVar.findTextContain("关注", 1);
            if (findTextContain == null || !findTextContain.exists()) {
                System.out.println("these is no store btn");
            }
            System.out.println("these is store btn, and text is:" + findTextContain.getText());
            System.out.println("x [" + findTextContain.getBounds().left + ", " + findTextContain.getBounds().right + "] ");
            System.out.println("y [" + findTextContain.getBounds().top + ", " + findTextContain.getBounds().bottom + "] ");
            findTextContain.click();
        } catch (Exception e) {
            e.printStackTrace();
            a.f(uiDevice);
        }
    }
}
